package barbershop.com.dao;

import barbershop.com.entity.Cashier;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface CashierDao extends JpaRepository<Cashier, Integer> {
    // 根据用户名以及密码登录
    @Query(value = "select * from cashier where cas_name=?1 and cas_pwd=?2",
    nativeQuery = true)
    Cashier casLogin(String casName, String casPwd);
}
